module UCS4 : sig
    val zero : int32
    val one : int32
    val minus_one : int32
    external neg : int32 -> int32 = "%int32_neg"
    external add : int32 -> int32 -> int32 = "%int32_add"
    external sub : int32 -> int32 -> int32 = "%int32_sub"
    external mul : int32 -> int32 -> int32 = "%int32_mul"
    external div : int32 -> int32 -> int32 = "%int32_div"
    external rem : int32 -> int32 -> int32 = "%int32_mod"
    val succ : int32 -> int32
    val pred : int32 -> int32
    val abs : int32 -> int32
    val max_int : int32
    val min_int : int32
    external logand : int32 -> int32 -> int32 = "%int32_and"
    external logor : int32 -> int32 -> int32 = "%int32_or"
    external logxor : int32 -> int32 -> int32 = "%int32_xor"
    val lognot : int32 -> int32
    external shift_left : int32 -> int -> int32 = "%int32_lsl"
    external shift_right : int32 -> int -> int32 = "%int32_asr"
    external shift_right_logical : int32 -> int -> int32 = "%int32_lsr"
    external to_int : int32 -> int = "%int32_to_int"
    external of_float : float -> int32 = "caml_int32_of_float"
    external to_float : int32 -> float = "caml_int32_to_float"
    external of_string : string -> int32 = "caml_int32_of_string"
    val to_string : int32 -> string
    external bits_of_float : float -> int32 = "caml_int32_bits_of_float"
    external float_of_bits : int32 -> float = "caml_int32_float_of_bits"
    type t = int32
    val compare : t -> t -> int
    external format : string -> int32 -> string = "caml_int32_format"
    val of_int : int -> int32
  end
type ucs4 = UCS4.t
type utf8_char = char
type utf8_string = string
type utf16_char = int
type utf16_string = (int, Bigarray.int16_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
type utf32_char = UCS4.t
type utf32_string = (UCS4.t, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t
val utf8_sequence : ?invalid_sequence:exn -> utf8_char -> int
val utf8_get_code : ?invalid_sequence:exn -> utf8_string -> int ref -> int
val utf8_set_code : ?invalid_sequence:exn -> utf8_string -> int ref -> int -> unit
val utf16_sequence : ?invalid_sequence:exn -> utf16_char -> int
val utf16_get_code : ?invalid_sequence:exn -> utf16_string -> int ref -> int
val utf16_set_code : ?invalid_sequence:exn -> utf16_string -> int ref -> int -> unit
val utf8_of_utf16 : ?invalid_sequence:exn -> utf16_string -> utf8_string
val utf8_of_utf32 : ?invalid_sequence:exn -> utf32_string -> utf8_string
val utf16_of_utf8 : ?invalid_sequence:exn -> utf8_string -> utf16_string
val utf16_of_utf32 : ?invalid_sequence:exn -> utf32_string -> utf16_string
val utf32_of_utf8 : ?invalid_sequence:exn -> utf8_string -> utf32_string
val utf32_of_utf16 : ?invalid_sequence:exn -> utf16_string -> utf32_string
module UTF8 : sig
    type elm = utf8_char
    external length : string -> int = "%string_length"
    external get : string -> int -> char = "%string_safe_get"
    external set : string -> int -> char -> unit = "%string_safe_set"
    external create : int -> string = "caml_create_string"
    val make : int -> char -> string
    val copy : string -> string
    val append : string -> string -> string
    val sub : string -> int -> int -> string
    val fill : string -> int -> int -> char -> unit
    val blit : string -> int -> string -> int -> int -> unit
    val concat : string -> string list -> string
    val iter : (char -> unit) -> string -> unit
    val escaped : string -> string
    val index : string -> char -> int
    val rindex : string -> char -> int
    val index_from : string -> int -> char -> int
    val rindex_from : string -> int -> char -> int
    val contains : string -> char -> bool
    val contains_from : string -> int -> char -> bool
    val rcontains_from : string -> int -> char -> bool
    type t = string
    val compare : t -> t -> int
    external unsafe_get : string -> int -> char = "%string_unsafe_get"
    external unsafe_set : string -> int -> char -> unit = "%string_unsafe_set"
    external unsafe_blit : string -> int -> string -> int -> int -> unit = "caml_blit_string" "noalloc"
    external unsafe_fill : string -> int -> int -> char -> unit = "caml_fill_string" "noalloc"
    val sequence : ?invalid_sequence:exn -> elm -> int
    val max_sequence : int
    val empty : t
    val get_code : ?invalid_sequence:exn -> utf8_string -> int ref -> int
    val set_code : ?invalid_sequence:exn -> utf8_string -> int ref -> int -> unit
    val of_utf16 : ?invalid_sequence:exn -> utf16_string -> utf8_string
    val of_utf32 : ?invalid_sequence:exn -> utf32_string -> utf8_string
    val of_array : elm array -> t
  end
module UTF16 :
  sig
    type elm = utf16_char
    type t = utf16_string
    external get : t -> int -> elm = "%caml_ba_ref_1"
    external set : t -> int -> elm -> unit = "%caml_ba_set_1"
    external compare : t -> t -> int = "%compare"
    val copy : t -> t
    val append : t -> t -> t
    val sub : t -> int -> int -> t
    val length : t -> int
    val sequence : ?invalid_sequence:exn -> elm -> int
    val max_sequence : int
    val empty : t
    val get_code : ?invalid_sequence:exn -> utf16_string -> int ref -> int
    val set_code : ?invalid_sequence:exn -> utf16_string -> int ref -> int -> unit
    val of_utf8 : ?invalid_sequence:exn -> utf8_string -> utf16_string
    val of_utf32 : ?invalid_sequence:exn -> utf32_string -> utf16_string
    val of_array : elm array -> t
  end
module UTF32 :
  sig
    type elm = utf32_char
    type t = utf32_string
    external get : t -> int -> elm = "%caml_ba_ref_1"
    external set : t -> int -> elm -> unit = "%caml_ba_set_1"
    external compare : t -> t -> int = "%compare"
    val copy : t -> t
    val append : t -> t -> t
    val sub : t -> int -> int -> t
    val length : t -> int
    val sequence : ?invalid_sequence:exn -> elm -> int
    val max_sequence : int
    val empty : t
    val get_code : ?invalid_sequence:exn -> t -> int ref -> int
    val set_code : ?invalid_sequence:exn -> t -> int ref -> int -> unit
    val of_utf8 : ?invalid_sequence:exn -> utf8_string -> utf32_string
    val of_utf16 : ?invalid_sequence:exn -> utf16_string -> utf32_string
    val of_array : elm array -> t
  end
